<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>修改密码</title>
    <link rel="stylesheet" href="__PUBLIC__/style/login.css">
    <style>
        #login_footer {
            position: absolute;
            bottom: 0;
            left: 0;
            right:0;
            color:gray;
            text-align: center;
            line-height: 2rem;
            font-size: .9rem;
        }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery"></script>
</head>
<body>
    <div class="logo">
        <img src="__PUBLIC__/images/logo.png" alt="logo" title="评估令">
    </div>
    <div class="login">
      <!-- 修改：密码更新 form地址 -->
        <form autocomplete="off" action="{:U(index/update_passwd)}" method="post" onsubmit="return checkAgain()">
          <!-- 修改：修改密码的token，看情况启用 -->
          <!-- <input type="hidden" name='token' value=""> -->
          <!-- 修改：value为当前手机号（或者用户ID等） -->
          <input class='login_phone' type="password" autocomplete="off" placeholder="旧密码" name='old_password'>
          <input class='login_pass' type="password" autocomplete="off" placeholder="修改后密码" name='new_password'>
          <input class='login_pass' type="password" autocomplete="off" placeholder="重复一次密码" name='check_password' form='test'>
          <input class='login_submit' type="submit" value="确定修改">
        </form>
        <div class="more_option">
            <!-- 修改：返回登陆 -->
            <a href="" class="more_forget">返回登陆</a>
            <!-- <a href="javascript:void()" class="more_signup">注册</a> -->
        </div>
    </div>
    <div id="login_footer">粤ICP备17132993号</div>
    <script>
        function checkAgain () {
            let newPass = $(`[name='new_password']`).val()
            let check = $(`[name='check_password']`).val()
            if(newPass === check) return true
            else {
                alert('请检查密码输入是否有误')
                return false
            }
        }
    </script>
</body>
</html>